<script>
export default {
  name: 'chauffeurInfo',
  props: {
    chauffeurInfo: {
      type: Object,
      required: true
    }
  }
}
</script>

<template>
  <div class="vehicle-info">
    <el-row :gutter="30" style="margin:10px">
      <el-col :span="14">
        <span class="label">司机编号:</span>
        <span class="value">{{ chauffeurInfo.id }}</span>
      </el-col>
      <el-col :span="10">
        <span class="label">司机名称:</span>
        <span class="value">{{ chauffeurInfo.name }}</span>
      </el-col>
    </el-row>
    <el-row :gutter="24" style="margin:10px">
      <el-col :span="12">
        <span class="label">司机状态:</span>
        <span class="value">
          <el-tag effect="dark">{{ chauffeurInfo.workStatus === 0 ? '休息' : '上班' }}</el-tag>
        </span>
      </el-col>
      <el-col :span="12">
        <span class="label">所属机构:</span>
        <span class="value">{{ chauffeurInfo.agency.name }}</span>
      </el-col>
    </el-row>
    <el-row :gutter="24" style="margin:10px">
      <el-col :span="12">
        <span class="label">司机工号:</span>
        <span class="value">{{ chauffeurInfo.account }}</span>
      </el-col>
      <el-col :span="12">
        <span class="label">司机电话:</span>
        <span class="value">{{ chauffeurInfo.mobile }}</span>
      </el-col>
    </el-row>
  </div>
</template>

<style scoped lang="scss">
.vehicle-info {
  width: 100%;
  height: 160px;
  background-color: #fbfafa;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: space-around;
  border-radius: 10px;
  margin-bottom: 10px;

  .label {
    font-size: 14px;
    color: #20232a;
    margin-right: 5px;
  }

  .value {
    color: #818693;
    font-size: 14px;
  }

  .el-tag {
    height: 20px;
    line-height: 20px;
    font-size: 12px;
  }
}
</style>
